package com.qf.springcloud.fallback;

import com.qf.springcloud.client.AirSearchClient;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.Map;

/**
 * @author zjw
 * @description
 * @date 2021/11/11 9:47
 */
@Component
public class AirSearchClientFallback implements AirSearchClient {

    /**
     * 目标服务中search功能的降级方法，返回结果是托底数据
     * @return
     */
    @Override
    public String search() {
        return "服务器就爆了，请稍后再试！！";
    }

    @Override
    public String delete(String id) {
        return null;
    }

    @Override
    public void update(String id, String name, Integer age, Date birthday) {

    }

    @Override
    public Map add(Map map) {
        return null;
    }
}
